package com.allwayz.service;

import com.allwayz.domain.CommonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author allwayz
 */
@FeignClient("seata-storage-service")
public interface StorageService {
    /**
     * 减库存
     *
     * @param productId
     * @param count
     * @return
     */
    @PostMapping(value = "/storage")
    CommonResult decrease(@RequestParam("productId") Long productId,@RequestParam("count") Integer count);
}
